package com.huya.demo.minio.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 线程池配置
 *
 * @author huya
 * @date 2025-01-13
 */
@Configuration
public class ThreadPoolConfig {
    @Bean
    public ExecutorService executorService() {
        // 创建一个固定大小为 10 的线程池
        return Executors.newFixedThreadPool(10);
    }
}
